package com.ccp.dev.workflow.dao;

/**
 * @ClassName HistoryActivityDao
 * @Description: 历史活动实例
 * @Author fanyanyan
 * @Date 2019/8/13
 * @Version V1.0
 **/

import com.ccp.dev.core.basic.base.IBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.flowable.engine.impl.persistence.entity.HistoricActivityInstanceEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;

@Repository
    public interface HistoryActivityDao extends IBaseMapper<HistoricActivityInstanceEntity,String> {

        /**
         * 根据流程实例ID 历史活动实例。
         * @param procInstId
         * @param nodeId
         * @return
         */
        List<HistoricActivityInstanceEntity> getByInstanceId(@Param("procInstId") String procInstId,@Param("nodeId") String nodeId);

    /**
     * 添加已办事宜
     * @param ent
     */
    void addMap(Map<String, Object> ent);

    /**
     *
     * @param procInstId
     * @param nodeId
     * @return
     */
    List<HistoricActivityInstanceEntity> getByProcInstId(@Param("procInstId") String procInstId, @Param("nodeId") String nodeId);

    /**
     * 根据executionId获取流程历史实例
     * @param executionId
     * @param nodeId
     * @return
     */
    List<HistoricActivityInstanceEntity> getByExecutionId(@Param("executionId") String executionId, @Param("nodeId") String nodeId);

    /**
     * 更新执行人信息
     * @param historicActivityInstanceEntity
     */

    void updateAssignee(HistoricActivityInstanceEntity historicActivityInstanceEntity);

    /**
     * 修改历史为开始。
     * @param processInstanceId    实例ID
     * @param nodeId    节点ID
     */
    void updateIsStart(@Param("processInstanceId") String processInstanceId, @Param("nodeId") String nodeId);
}

